
// 将go的日期进行解析  '2023-06-27T17:11:51.426+08:00';
export function ParseGoDateStr(dateString:string) :string{
     console.log(dateString," ---dateString")
    if(dateString=='0001-01-01T00:00:00Z'){
        return '0000-00-00 00:00:00'
    }
   // const dateString =
    const dateObj = new Date(dateString);

// 解析日期部分
    const year = dateObj.getFullYear();
    const month = String(dateObj.getMonth() + 1).padStart(2, '0');
    const day = String(dateObj.getDate()).padStart(2, '0');

// 解析时间部分
    const hours = String(dateObj.getHours()).padStart(2, '0');
    const minutes = String(dateObj.getMinutes()).padStart(2, '0');
    const seconds = String(dateObj.getSeconds()).padStart(2, '0');

// 构建解析后的结果字符串
    const formattedDate = `${year}-${month}-${day}`;
    const formattedTime = `${hours}:${minutes}:${seconds}`;
    return  formattedDate+" "+formattedTime
}